package com.linkvin.ec.hcs.service.util.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

public enum VehicleAirSuctionEnum {

    // 进气形式 10 涡轮增压 20 自然吸气 30 机械增压 40 双涡轮增压 50 四涡轮增压 60 机械+涡轮增压
    WLZY("10", "涡轮增压"),
    ZRXQ("20", "自然吸气"),
    JXZY("30", "机械增压"),
    TWLZY("40", "双涡轮增压"),
    FWLZY("50", "四涡轮增压"),
    JXWLZY("60", "机械+涡轮增压");

    private final String value;
    private final String text;

    private static final Map<String, String> lookup = new HashMap<>();

    static {
        for (VehicleAirSuctionEnum s : EnumSet.allOf(VehicleAirSuctionEnum.class)) {
            lookup.put(s.getValue(),s.getText());
        }
    }

    VehicleAirSuctionEnum(String value, String text) {
        this.value = value;
        this.text = text;
    }

    /**
     * Gets value.
     *
     * @return the value
     */
    public String getValue() {
        return value;
    }

    /**
     * Gets text.
     *
     * @return the text
     */
    public String getText() {
        return text;
    }

    /**
     *
     * @param value
     * @return
     */
    public static VehicleAirSuctionEnum getByValue(String value) {
        for (VehicleAirSuctionEnum temp : VehicleAirSuctionEnum.values()) {
            if (temp.getValue().equals(value)) {
                return temp;
            }
        }
        return null;
    }

    /***
     * 得到所有的值
     * @return
     */
    public static Map<String, String> lookup() {
        return lookup;
    }

}
